import java.util.*;

public class Practice2 {
    public static void main(String[] args) {
        //https://ac.nowcoder.com/acm/problem/224679
        //开始想用前缀, 发现好像滑动窗口更方便
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int k = sc.nextInt();
        long happy = 0;
        long shame = 0;
        long maxHappy = Integer.MIN_VALUE;
        long minShame = Integer.MAX_VALUE;
        int day = 0;
        int[][] arr = new int[2][n];
        // 3  8  9  16
        // 4  10 15 16
        for (int i = 0; i < 2; i++) {
            for (int j = 0; j < n; j++) {
                arr[i][j] = sc.nextInt();
            }
        }

        int left = 0;
        for (int right = 0; right < n; right++) {
            happy += arr[0][right];
            shame += arr[1][right];
            if(right - left + 1 == k){
                if(maxHappy < happy){
                    maxHappy = happy;
                    minShame = shame;
                    day = left;
                }else if(maxHappy == happy){
                    if(minShame > shame){
                        minShame = shame;
                        day = left;
                    }
                }
                happy -= arr[0][left];
                shame -= arr[1][left++];
            }
        }
        System.out.println(day + 1);
    }
}
